<?php

declare(strict_types=1);

namespace Modules\Purchasing\Models;

use Catch\Base\CatchModel as Model;

/**
 * @property $id
 * @property $creator_id
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
 * @property $purchasewarehousing_id
 * @property $fid
 * @property $fseq
 * @property $fentryid
 * @property $fmaterialid
 * @property $fmaterialname
 * @property $fmaterialmodel
 * @property $fmodel
 * @property $funitid_number
 * @property $funitid_name
 * @property $fqty
 * @property $fstockid_number
 * @property $fstockid_name
 * @property $fmemo
 * @property $fownertypeid
 * @property $fownerid_number
 * @property $fownerid_name
 * @property $barcode
 * @property $storagelocation
*/
class PurchasewarehousingMateriel extends Model
{
    

    protected $table = 'purchasewarehousing_materiel';

    protected $fillable = [ 'id', 'creator_id', 'created_at', 'updated_at', 'deleted_at', 'purchasewarehousing_id', 'fid', 'fseq', 'fentryid', 'fmaterialid', 'fmaterialname', 'fmaterialmodel', 'fmodel', 'funitid_number', 'funitid_name', 'fqty', 'fstockid_number', 'fstockid_name', 'fmemo', 'fownertypeid', 'fownerid_number', 'fownerid_name', 'barcode', 'storagelocation','putquantity' ,'salesout_attached_id','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];

    /**
     * @var array
     */
    protected array $fields = ['id','created_at','updated_at','purchasewarehousing_id','fid','fseq','fentryid','fmaterialid','fmaterialname','fmaterialmodel','fmodel','funitid_number','funitid_name','fqty','fstockid_number','fstockid_name','fmemo','fownertypeid','fownerid_number','fownerid_name','barcode','storagelocation','putquantity','salesout_attached_id','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];

    /**
     * @var array
     */
    protected array $form = ['id','created_at','updated_at','purchasewarehousing_id','fid','fseq','fentryid','fmaterialid','fmaterialname','fmaterialmodel','fmodel','funitid_number','funitid_name','fqty','fstockid_number','fstockid_name','fmemo','fownertypeid','fownerid_number','fownerid_name','barcode','storagelocation','putquantity','salesout_attached_id','fields1','fields2','fields3','fields4','fields5','fields6','fields7','fields8','fields9','fields10'];

    /**
     * @var array
     */
    public array $searchable = [
        
    ];

    /**
     * 时间格式化
     * @param $date
     * @return mixed
     */
    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i');
    }

    
}
